package com.yonyou.cyxdms.basedata.service.repository.questionaire;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yonyou.cyx.framework.dao.base.SuperMapper;
import com.yonyou.cyxdms.basedata.service.dto.questionaire.QueryAnswerDTO;
import com.yonyou.cyxdms.basedata.service.entity.questionaire.QuestionPO;
import com.yonyou.cyxdms.basedata.service.vo.questionaire.AnswerQuestionVO;
import com.yonyou.cyxdms.basedata.service.vo.questionaire.QuestionGroupVO;
import com.yonyou.cyxdms.basedata.service.vo.questionaire.QuestionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 问题库 Mapper 接口
 * </p>
 *
 * @author renwd
 * @since 2019-09-19
 */
public interface QuestionMapper extends SuperMapper<QuestionPO> {

    List<QuestionGroupVO> queryQuestionGroupInfo(Page<QuestionGroupVO> page, @Param("params")QueryAnswerDTO queryAnswerDTO);

    QuestionVO queryQuestionById(@Param("questionId")Long questionId);

    List<Long> selectByQuestionName(@Param("appId")String appId, @Param("ownerCode")String ownerCode, @Param("questionId")Long questionId, @Param("questionName")String questionName);

    List<Long> selectByQuestionContent(@Param("appId")String appId, @Param("ownerCode")String ownerCode, @Param("questionId")Long questionId, @Param("questionContent")String questionContent);

    List<AnswerQuestionVO> queryQuestionByQuestionnaireId(Page<AnswerQuestionVO> page, @Param("questionId")Long questionId);
}
